// 使用Maybe重写ex4，不要有if语句

const { Maybe } = require('./support')

// let ex4 = function (n) {
//   if (n) {
//     return parseInt(n)
//   }
// }

// console.log(ex4())
// console.log(ex4(1.14))

let ex4 = n => Maybe.of(n).map(parseInt)
console.log(ex4())
console.log(ex4(1.14))
